/**
 * Implementacion de la clase Edge.
 */

#include "edge.hpp"


Edge::Edge(std::string id, std::string originId, std::string destinyId, Weight weight){
	this->id = id;
	this->originId = originId;
	this->destinyId = destinyId;
	this->weight = weight;
}

std::string Edge::getId(){
	return this->id;
}

std::string Edge::getOriginId(){
	return this->originId;
}

std::string Edge::getDestinyId(){
	return this->destinyId;
}

Weight Edge::getWeight(){
	return this->weight;
}

void Edge::setId(std::string id){
	this->id = id;
}

void Edge::setOrigin(std::string origin){
	this->originId = origin;
}

void Edge::setDestiny(std::string destiny){
	this->destinyId = destiny;
}

void Edge::setWeight(Weight weight){
	this->weight = weight;
}

Edge& Edge::operator=(Edge &original){
	this->id = original.getId();
	this->originId = original.getOriginId();
	this->destinyId = original.getDestinyId();
	this->weight.setLength(original.getWeight().getLength());
	this->weight.setVelocity(original.getWeight().getVelocity());
	//this->weight = original.getWeight();
	return *this;
}

int Edge::operator==(Edge &original) const{
    return (this->id == original.getId());
}

int Edge::operator!=(Edge &original) const{
    return (this->id != original.getId());
}

int Edge::operator<(Edge &original) const{
    return (this->id < original.getId());
}

int Edge::operator>(Edge &original) const{
    return (this->id > original.getId());
}

int Edge::operator<=(Edge &original) const{
    return (this->id <= original.getId());
}

int Edge::operator>=(Edge &original) const{
    return (this->id >= original.getId());
}

Edge::~Edge(){
    //has to do nothing
}

